package net.WMisiedjan.BukkitToDate.Launcher;

import java.io.File;
import java.io.IOException;
import java.security.Permission;

public class CraftBukkitSecurity extends SecurityManager {

	@Override
	public void checkExit(int status) {
		if (status == 210) {
			throw new SecurityException();
		}
	}

	@Override
	public void checkPermission(Permission perm) {
		checkPermission(perm, null);

	}

	@Override
	public void checkPermission(Permission perm, Object context) {
		if (perm.getName().contains("exitVM.210")) {
			System.out.println("Plugin Requested Restart!");
		}
	}
}
